<template>
    <div>
        <div class="nav">
            <div class="nav-left">
                    <div class="left-txt">OA办公后台管理系统</div>
                <div class="homepage-pic">
                    <div class="title1" @click="ind()">
                        <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u308.svg" alt="">
                        <p>首页</p>
                    </div>
                    <div class="title2" @click.stop="btn()">
                        <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u311.svg" alt="">
                        <slot name="topic"></slot>
                        <div v-show="!bol" class="hide" >
                            <ul>
                                <li class="hide-item" @click="jump(0)">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u334.svg" alt="">
                                    <p>组织</p>
                                </li>
                                <li class="hide-item" @click="jump(1)">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u337.svg" alt="">
                                    <p>员工</p>
                                </li>
                                <li class="hide-item" @click="jump(2)">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u340.svg" alt="">
                                    <p>考勤</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u343.svg" alt="">
                                    <p>薪酬</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u346.svg" alt="">
                                    <p>社保公积金</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u349.svg" alt="">
                                    <p>绩效</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u352.svg" alt="">
                                    <p>招聘</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u355.svg" alt="">
                                    <p>审批</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u358.svg" alt="">
                                    <p>会议室预定</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u361.svg" alt="">
                                    <p>车辆</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u364.svg" alt="">
                                    <p>新闻</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u367.svg" alt="">
                                    <p>公告</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u370.svg" alt="">
                                    <p>合同库</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u373.svg" alt="">
                                    <p>文档库</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u376.svg" alt="">
                                    <p>资产</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u382.svg" alt="">
                                    <p>培训</p>
                                </li>
                                <li class="hide-item">
                                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u379.svg" alt="">
                                    <p>系统设置</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="ipt-content">
                    <div class="cont">
                        <div class="search-pic">
                            <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u315.svg" alt="">
                        </div>
                        <div class="search-txt">
                            <input id="s-ipt" type="text" placeholder="请输入关键字">
                        </div>
                    </div>
                </div>
            </div>
            <div class="nav-right">
                <div class="pic">
                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u328.svg" alt="">
                    <div class="red-pic">
                        <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u329.svg" alt="">
                    </div>
                </div>
                <div class="author">
                    <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u322.svg" alt="">
                </div>
                <div class="author-name">
                    <span>Admin</span>
                    <div class="triangle">
                        <img src="https://preview.axure6.com/194/images/%E6%BC%94%E7%A4%BA%E6%A1%86%E6%9E%B6/u321.svg" alt="">
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    components:{

    },
    data(){
        return {
            bol:true
        }
    },
    methods:{
        btn(){
            if(this.bol){
                this.bol=false
                console.log(22);
                
            }else{
                this.bol=true
                console.log(2222);
                
            }
        },
        //应用中心显示与隐藏
       
        jump(i){
            if(i==0){
                this.$router.push('organizationView')
            }else if(i==1){
                this.$router.push('staffView')
            }else if(i==2){
                this.$router.push('AttendanceView')
            } 
        },
        ind(){
            this.$router.push('about')
        }
    }
}
</script>

<style lang="scss" scoped>
.nav{
    position: fixed;
    top: 0;
    width: 100vw;
    height: 60px;
    z-index: 99;
    // overflow-y: hidden;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
    background-color: rgba(37, 97, 239, 1);
    display: flex;
    justify-content: space-between;
    .nav-left{
        display: flex;
        .left-txt{
        padding-left:10px ;
        line-height: 60px;
        font-weight: 500;
        font-style: normal;
        font-size: 16px;
        color: #FFFFFF;
    }
    .homepage-pic{
        display: flex;
        
        .title1{
            margin-left: 45px;
            padding: 8px 0 5px 0;
            box-sizing: border-box;
            width: 100px;
            height: 60px;
            p{
                font-size: 14px;
                color: #fff;
                height: 20px;
                margin: 2px 0 0;
            }
        }
        .title2{
            margin-left: 30px;
            padding: 8px 0 5px 0;
            box-sizing: border-box;
            width: 100px;
            height: 60px;
            position: relative;
            p{
                font-size: 14px;
                color: #fff;
                height: 20px;
                margin: 2px 0 0;
            }
            .hide{
                padding: 20px;
                position: absolute;
                width: 480px;
                height: 390px;
                background: inherit;
                background-color: rgba(255, 255, 255, 1);
                box-sizing: border-box;
                border-radius: 10px;
                box-shadow: 0px 10px 30px rgba(228, 228, 228, 1);
                z-index: 0;
                top: 74px;
                left: -180px;
                opacity: 1;
                // transition: all 1s;
                ul{
                    display: flex;
                    flex-wrap: wrap;
                    // justify-content: space-between;
                    
                    .hide-item{
                        margin-right: 8px;
                        padding-top: 10px;
                        width: 80px;
                        height: 80px;
                        font-weight: 400;
                        text-align: center;
                        &:hover{
                            background-color: rgba(37, 97, 239, 0.0784313725490196);
                        }
                        p{
                            margin-top: 12px;
                            font-style: normal;
                            font-size: 14px;
                            color: #333 !important;
                        }
                    }
                }
            }
        }
    }
    .ipt-content{
        margin-top: 10px;
        margin-left: 45px;
        width: 400px;
        height: 40px;
        box-shadow: none;
        font-size: 12px;
        color: #CCCCCC;
        text-align: left;
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 1);
        .cont{
            position: relative;
            .search-pic{
                position: absolute;
                top: 11px;
                left: 17px;
            }
            .search-txt{
                position: absolute;
                top: 5px;
                left: 46px;
                width: 211px;
                height: 30px;
                display: flex;
                font-size: 14px;
                #s-ipt{
                    caret-color: rgb(204, 204, 204);
                    font-weight: 400;
                    font-style: normal;
                    font-size: 14px;
                    border: 0;
                    outline: none;
                }
            }
        }
    }
    }
    .nav-right{
        padding-left: 50px;
        box-sizing: border-box;
        width: 249px;
        height: 60px;
        display: flex;
        .pic{
            position: relative;
            cursor: pointer;
            margin-top: 22px;
            width: 14px;
            height: 18px;
            .red-pic{
                position: absolute;
                top: -9px;
                left: 10px;

            }
        }
        .author{
            margin-top: 10px;
            margin-left: 38px;
            width: 40px;
            height: 40px;
        }
        .author-name{
            position: relative;
            margin-left: 10px;
            padding-top: 18px;
            box-sizing: border-box;
            font-weight: 650;
            font-style: normal;
            color: #FFFFFF;
            .triangle{
                position: absolute;
                top: 13px;
                right: -11px;
            }
        }
    }
}
input::placeholder {
    color: rgb(204, 204, 204); /* 现代浏览器 */
    opacity: 1; /* 确保opacity不是0 */
}
 
input::-webkit-input-placeholder { /* Chrome, Safari, Opera */
    color: rgb(204, 204, 204);
    opacity: 1;
}
 
input::-moz-placeholder { /* Firefox 19+ */
    color: rgb(204, 204, 204);
    opacity: 1;
}
 
input:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: rgb(204, 204, 204);
}
ul :nth-child(5n) .hide-item{
    margin-right: 0;
}
.active{
    position: relative;
    // z-index: -99;
    opacity: 0 !important;
    transition: all .6s;
}
.title1:hover{
    background-color: rgba(0, 51, 204, 0.498039215686275);
    border-bottom: 3px solid rgba(255, 255, 255, 1);
}
.activ{
    background-color: rgba(0, 51, 204, 0.498039215686275);
    border-bottom: 3px solid rgba(255, 255, 255, 1);
}
</style>